Ch (computer programming)
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
top
CH /ˌsiːˈeɪtʃ/ is a proprietary cross-platform C and C++ interpreter and scripting language environment. It was designed by Harry Cheng as a scripting language for beginners to learn mathematics, computing, numerical analysis (numeric methods), and programming in C/C++. Ch is now developed and marketed by SoftIntegration, Inc.. Free versions include the student edition, and the non-commercial Professional Edition for Raspberry Pi.
CH can be embedded in C and C++ application programs. It has numerical computing and graphical plotting features. CH is combined of both shell and IDE.cite-ref-1[1] CH shell combines the features of common shell and C language.cite-ref-2[2] ChIDE provides quick code navigation and symbolic debugging. It is based on embedded CH, Scite, and Scintilla.cite-ref-3[3]cite-ref-4[4]
CH is written in C and runs on Windows, Linux, macOS, FreeBSD, AIX, Solaris, QNX, and HP-UX. It supports C90 and major C99 features, but it does not support the full set of C++ features. C99 complex number, IEEE 754 floating-point arithmetic, and variable-length array features were supported in CH before they became part of the C99 standard.cite-ref-5[5]cite-ref-6[6]cite-ref-7[7]cite-ref-8[8] An article published by Computer Reseller News (CRN) named CH as notable among C-based virtual machines for its functionality and the availability of third-party libraries.cite-ref-9[9]
CH has many tool kits that extend its functions. For example, the CH Mechanism Toolkit is used for design and analysis of commonly used mechanisms such as four-bar linkage, five-bar linkage, six-bar linkage, crank-slider mechanism, and cam-follower system.cite-ref-10[10] CH Control System Toolkit is used for the design, analysis, and modelling of continuous-time or discrete-time linear time-invariant (LTI) control systems.cite-ref-11[11] Both tool kits include the source code.
CH has been integrated into free C-STEM Studio, a platform for learning computing, science, technology, engineering, and mathematics (C-STEM) with robotics. C-STEM Studio is developed by the UC Davis Center for Integrated Computing and STEM Education, offering a curriculum for K-12 students.
CH supports LEGO Mindstorms NXT and EV3, Arduino, Linkbot, Finch Robot, RoboTalk and Raspberry Pi, Pi Zero, and ARM for robot programming and learning.cite-ref-12[12]cite-ref-13[13]cite-ref-14[14] It can also be embedded into the LabVIEW system design platform and development environment.cite-ref-15[15]
Contents
• Features
• See also
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Features
CH supports the 1999 ISO C Standard (C99) and C++ classes. It is a superset of C with C++ classes. Several major features of C99 are supported, such as complex numbers, variable length arrays (VLAs), IEEE 754 floating-point arithmetic, and generic mathematical functions. The specification for wide characters in Addendum 1 for C90 is also supported.
C++ features available in CH include:
• Mixed code and declaration
• The this -> pointer
• Function-style type conversion
• Classes
• Private/public data and functions in classes. Ch is compatible with C++ in that by default, members of a class definition are assumed to be private until a 'public' declaration is given
• Static member of class/struct/union
• Const member functions
• The new and delete operators
• Constructors and destructors
• The I/O functions cout, cerr, and cin with endl
• Arguments for variadic functions are optional
CH supports classes in C++ with added abilities, including:
• Classes inside member functions
• Nested functions with classes
• Passing member function to argument of pointer-to-function type of functions
CH can interact with existing C/C++ libraries and call C/C++ functions from CH script.cite-ref-16[16] As a C/C++ interpreter, CH can be used as a scripting engine and extension language for applications. Pointers to arrays or variables can be passed and shared in both C-compiled and CH scripting contexts. One example of an embedded CH scripting application is Mobile-C, which has been used for collaborative visualization of distributed mesh model.cite-ref-17[17]cite-ref-18[18]cite-ref-19[19]
CH has a built-in string type (string_t) for automatic memory allocation and de-allocation. It supports shell aliases, history, and piping.cite-ref-20[20]cite-ref-21[21]
CH has built-in 2D/3D graphical plotting features and computational arrays for numerical computing. A 2D linear equation of the form b = A*x can be written verbatim in Ch.cite-ref-22[22]
See also
References
cite-note-11. ↑ citerefveeraraghavan2013Veeraraghavan, Sriranga (2013). "An introduction to Ch: Implementing a temperature converter in Ch". ComputerWorld. {{cite journal}}: Cite journal requires |journal= (help)
cite-note-22. ↑ Ch Shell
cite-note-33. ↑ Ch IDE
cite-note-55. ↑ citerefcheng1993Cheng, Harry (1993). "Handling of Complex Numbers in the Ch Programming Language". Scientific Programming: 76–106.
cite-note-66. ↑ citerefcheng1993Cheng, Harry (1993). "Scientific Computing in the Ch Programming Language". Scientific Programming: 49–75. {{cite journal}}: Cite journal requires |journal= (help)
cite-note-77. ↑ citerefcheng1995Cheng, Harry (1995). "Extending C and FORTRAN for Design Automation". ASME Trans., Journal of Mechanical Design: 390–395. {{cite journal}}: Cite journal requires |journal= (help)
cite-note-99. ↑ citerefmorejon2006Morejon, Mario (2006). "Ch Language Rivals Java Functionality". CRN. {{cite journal}}: Cite journal requires |journal= (help)
cite-note-1212. ↑ ch robot
cite-note-1313. ↑ ch finch
cite-note-1414. ↑ ch raspberry and arm
cite-note-1515. ↑ "Embedding a C/C++ Interpreter Ch into LabVIEW for Scripting".
cite-note-1616. ↑ citerefwilson2004Wilson, Matthew (2004). "Open-RJ and Ch". Dr. Dobb's Journal.
cite-note-1717. ↑ citerefcheng2009Cheng, Harry (2009). "Speeding-Up Software Development Using Embedded Scripting". Dr. Dobb's Journal. p. 8.
cite-note-1818. ↑ citerefwangbohagiwara2009Wang, Li-rong; Bo, Yo; Hagiwara, I (2009). 2009 IEEE 10th International Conference on Computer-Aided Industrial Design & Conceptual Design. Computer-Aided Industrial Design & Conceptual Design, 2009. CAID & CD 2009. IEEE 10th International Conference. pp. 1127–1132. doi:10.1109/CAIDCD.2009.5375178. ISBN 978-1-4244-5266-8. S2CID 39307433.
cite-note-1919. ↑ citerefwangbohagiwara2009Wang, Li-rong; Bo, Yo; Hagiwara, Ichiro (2009). An agent based collaborative simplification of 3D mesh model. Cdve'09. CDVE'09 Proceedings of the 6th international conference on cooperative design, visualization, and engineering. pp. 325–328. ISBN 9783642042645.
cite-note-2020. ↑ citerefcampbell2003Campbell, Matt (2003). "Ch, A C/C++ Interpreter – New possibilities for people who like C and Unix". MACTECH, the journal of Apple technology. {{cite journal}}: Cite journal requires |journal= (help)
cite-note-2121. ↑ citerefcheng2010Cheng, Harry (2010). The Ch Language Environment (6.3 ed.). Davis, CA: SoftIntegration, Inc.
cite-note-2222. ↑ citerefglassborow2001Glassborow, Francis (2001). "The Ch Language Environment Version 2.0". C Vu Magazine: 36–37. {{cite journal}}: Cite journal requires |journal= (help)
Further reading
• citerefheller2001Heller, Martin (2001). "The Ch Language Environment". Byte. Archived from the original on November 16, 2001. {{cite journal}}: Cite journal requires |journal= (help)
• citerefcheng2002Cheng, Harry (2002). "C99 & Numeric Computing". Dr. Dobb's Journal. pp. 28–34.
• citerefcheng2006Cheng, Harry (2006). "Ch: A C/C++ Interpreter for Script Computing". Dr. Dobb's Journal. pp. 6–12.
• citerefcheng2009Cheng, Harry (2009). C For Engineers & Scientists, An Interpretive Approach. McGraw-Hill. ISBN 978-0-07-729046-7.
• citerefcheng2011Cheng, Harry (2011). C For Engineers & Scientists (Chinese ed.). Higher Education Press. ISBN 978-0-07-729046-7.
External links
• Official website, SoftIntegration
• Mobile-C: a Multi-Agent Platform for Mobile C/C++ Agents Home Page
• C-STEM Studio